Micron Document
🎖️GitЯра🎖️


Displaying Raw • Download

core/common/src/androidMain/kotlin/org/meshtastic/core/common/util/CompatExtensions.kt 7631db63d0bdff28078438b095c0259306cb6617 (7631db63) Text, 1.55 KB

T8b949e/*
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72package T7ee787org.meshtastic.core.common.util

Tff7b72import T7ee787android.content.BroadcastReceiver
Tff7b72import T7ee787android.content.Context
Tff7b72import T7ee787android.content.Intent
Tff7b72import T7ee787android.content.IntentFilter
Tff7b72import T7ee787android.os.Parcelable
Tff7b72import T7ee787androidx.core.content.ContextCompat
Tff7b72import T7ee787androidx.core.content.IntentCompat

T8b949e/** Retrieves a [Parcelable] extra from an [Intent] in a backward-compatible way. */
Tff7b72inline Tff7b72fun Tff7b72<Tff7b72reified Te6edf3T Tb4b4b4: Te6edf3ParcelableTff7b72> Te6edf3IntentTb4b4b4.Td2a8ffgetParcelableExtraCompatTb4b4b4(Te6edf3keyTb4b4b4: Tffa657String?Tb4b4b4)Tb4b4b4: Te6edf3T? Tff7b72=
Te6edf3IntentCompatTb4b4b4.Te6edf3getParcelableExtraTb4b4b4(Tff7b72thisTb4b4b4, Te6edf3keyTb4b4b4, Te6edf3TTff7b72::Te6edf3classTb4b4b4.Te6edf3javaTb4b4b4)

T8b949e/** Registers a [BroadcastReceiver] using [ContextCompat] to ensure consistent behavior across Android versions. */
Tff7b72fun Te6edf3ContextTb4b4b4.Td2a8ffregisterReceiverCompatTb4b4b4(
Te6edf3receiverTb4b4b4: Te6edf3BroadcastReceiverTb4b4b4,
Te6edf3filterTb4b4b4: Te6edf3IntentFilterTb4b4b4,
Te6edf3flagTb4b4b4: Tffa657Int Tff7b72= Te6edf3ContextCompatTb4b4b4.Te6edf3RECEIVER_EXPORTEDTb4b4b4,
Tb4b4b4) Tb4b4b4{
Te6edf3ContextCompatTb4b4b4.Te6edf3registerReceiverTb4b4b4(Tff7b72thisTb4b4b4, Te6edf3receiverTb4b4b4, Te6edf3filterTb4b4b4, Te6edf3flagTb4b4b4)
Tb4b4b4}

Served by rngit 1.5.0 - Generated in 0.06s